<?php

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/

/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\Models\User::class, function (Faker\Generator $faker) {
    static $jobNumber = '0';
    ++$jobNumber;
    return [
        'name' => $faker->name,
        'user_name' => $faker->userName,
        'email' => $faker->unique()->safeEmail,
        'job_title' => str_random(16),
        'password' => '123456',
        'remember_token' => str_random(10),
        'sex' => $faker->boolean(),
        'job_number' => substr('00000', 0 , 5 - strlen($jobNumber)) . $jobNumber
    ];
});


